//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UserHasAccount, UserHasAccountResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUserHasAccountList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UserHasAccountResponse>(`/uctoo/user_has_account/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUserHasAccount = async (id: string) => {
  return requestClient.get<UserHasAccount>(`/uctoo/user_has_account/${id}`);
};

export const adductooUserHasAccount = async (data: Partial<UserHasAccount>) => {
  return requestClient.post<UserHasAccount>('/uctoo/user_has_account/add', data);
};

export const edituctooUserHasAccount = async (data: Partial<UserHasAccount>) => {
  return requestClient.post<UserHasAccount>('/uctoo/user_has_account/edit', data);
};

export const deleteuctooUserHasAccount = async (id: string) => {
  return requestClient.post<any>('/uctoo/user_has_account/del', { id });
};
